import { Message } from 'element-ui'
export default function ({ $axios, redirect }) {
  $axios.onError((error) => {
    const { statusCode, message } = error.response.data
    const reg = /^4\d\d$/
    if (reg.test(statusCode)) {
      Message.error(message)
    }
  })
}
